﻿using System;
using System.Web.UI;
using System.Web;

namespace DflyingForum.Core.Framework
{
    public class DflyingJScript
    {
        public static void Alert(string msg, Page page)
        {
            string js = string.Format("<script language=\"javascript\">alert('{0}')</script>", msg);
            if (!page.ClientScript.IsStartupScriptRegistered(page.GetType(), "alert"))
            {
                page.ClientScript.RegisterStartupScript(typeof(Page), "alert", js);
            }
        }
    }
}
